import os,sys,random,pygame,math
from pygame.locals import *
import cPickle as pickle

import screen

def load_image(name,colorkey):
    fullname = os.path.join('data','pictures',name)
    i=pygame.image.load(fullname)
    if colorkey==0:
        colorkey=None
    if colorkey is not None:
        if colorkey is -1:
            colorkey = i.get_at((0,0))
        i.set_colorkey(colorkey, RLEACCEL)
    return i.convert()


class Sign:
    def __init__(self,pos,message):
        self.image = load_image('sign.png',-1)
        self.rect = self.image.get_rect(topleft = pos)

    def update(self):
        screen.screen.blit(self.image,self.rect)

    def move(self,move):
        self.rect=self.rect.move(move)

class Tutorial_Sign:
    def __init__(self,pos,message):
        x = pos[0]
        y = pos[1]
        self.image = load_image('tut_sign.png',-1)
        self.rect = self.image.get_rect(bottomleft = (x,y+64))

    def update(self):
        screen.screen.blit(self.image,self.rect)

    def move(self,move):
        self.rect=self.rect.move(move)

class Message:
    def __init__(self,message):
        pass
